#include<stdio.h>
#define _CRT_SECURE_NO_WARNINGS 1
 
int numberof1(int k)
{
	int count = 0;
	while (k)
	{
		k = k & (k - 1);
		count++;
	}

	return count;

}

int main()
{
	//int n = 0;
	//scanf_s("%d",&n);
	//int ret = numberof1(n);
	//printf("%d", ret);
	int n = 0;
	int m = 0;
	scanf_s("%d", &n);
	scanf_s("%d ", &m);
	int ret = m ^ n;
	printf("%d", numberof1(ret));


	return 0;
}